<template>
	<view class="bj1">
		<view class="wrap" style="width: 93%;margin: 0 auto;">
			<!-- 基本信息 -->
			<view id="jcxx">
				<view style="border-radius: 10px;">

					<view class="msg-wrap"
						style="background-color: #ffffff;border-radius:16px 16px 16px 16px ; padding: 24rpx 24rpx 0 24rpx;">
						<view class="form-list-head-msg dis" style="margin-bottom: 32rpx;">
							<view class="red-line"></view>
							<view class="form-list-head-msg-left">您的基础信息</view>
						</view>
						<view class="msg-wrap-msg" style="display: flex; align-items: center;padding-bottom: 8rpx;">
							<view class="msg-wrap-left">姓名</view>
							<view class="msg-wrap-right msg-wrap-right-name">
								<input type="text" @blur="blur(1)" placeholder-style="color:#C3C3C3" maxlength="10"
									v-model="form.name" placeholder="请填写真实姓名"
									style="text-align: left;direction: ltr;" />

								<view class="uni-radio-gender-list">
									<radio-group @change="radioChange"
										style="display: flex;color: #C3C3C3;transform: scale(0.6);">
										<radio class="xb" value="1" :checked="form.gender == 1"> 男</radio>
										<radio class="xb" value="2" :checked="form.gender == 2"
											style="margin-left: 36rpx;"> 女 </radio>
									</radio-group>
								</view>
							</view>
						</view>
						<view class="msg-wrap-msg">
							<view class="msg-wrap-left">年龄</view>
							<view class="msg-wrap-right msg-wrap-right-age">
								<input type="number" @blur="blur(2)" placeholder-style="color:#C3C3C3" maxlength="2"
									v-model="form.age" placeholder="请填写真实年龄" style="text-align: left;direction: ltr;" />

							</view>
						</view>

						<view class="msg-wrap-msg">
							<view class="msg-wrap-left">职业</view>
							<view class="msg-wrap-right">
								<view class="job-options">
									<view class="job-option" v-for="(item, index) in jobOptions" :key="index"
										:class="{ active: form.company === item.value }"
										@click="form.company = item.value">
										{{ item.title }}
									</view>
								</view>
							</view>
						</view>
						<view class="msg-wrap-msg">
							<view class="msg-wrap-left" style="display: flex; align-items: center;">城市</view>
							<view class="msg-wrap-right"
								style="display: flex; justify-content: end; align-items: center;">
								<view class="" style="font-size: 24rpx; margin-right: 28rpx;">
									定位不准？手动选择城市
								</view>
								<view class="">
									<text class="msg-wrap-right-text" @click="chooseCity">

										{{form.cityName}}
										<text class="msg-wrap-right-text-jt">></text>

									</text>
								</view>
							</view>
						</view>
					</view>

					<!-- 资产信息 -->
					<view id="jcxx">
						<view>

							<view class="msg-wrap"
								style="background-color: #ffffff;border-radius:16px 16px 16px 16px ; padding: 24rpx 24rpx 64rpx 24rpx;">
								<view class="form-list-head-msg dis"
									style="display: flex; align-items: center; margin-bottom: 36rpx;">
									<view class="red-line"></view>
									<view class="form-list-head-msg-left">您的资产信息</view>
									<view class="form-list-head-msg-right-desc">（多选，资产信息越全，贷款金额越高）</view>
								</view>

								<view class="msg-wrap-right">
									<view class="job-optionszc">
										<view class="job-optionzc" v-for="(item, index) in jobOptionss" :key="index"
											:class="{ active: form[item.field]==item.key }" @click="handleZichan(item)">
											<view class="job-optionzc-container">
												<view class="job-optionzc-title">{{ item.title }}</view>
												<view v-if="item.desc" class="job-optionzc-desc">{{item.desc}}</view>
											</view>
										</view>
									</view>
								</view>

							</view>
						</view>
					</view>
				</view>
				<view class="gobutton" @click="loginclick">
					<text>提交</text>
				</view>
			</view>

		</view>



		<uni-popup ref="popcity" type="bottom" border-radius="10px 10px 0 0">

			<view style="height: 1120rpx; background-color: #FF4F01;">
				<city-select :cityValue="{
					cityName: form.cityName,
					cityCode: form.cityCode,
					provinceName: form.provinceName,
					provinceCode: form.provinceCode,
				}" @cityClick="cityClick" @onClose="handleCloseCityChoose" @ww="ww" :formatName="formatName"
					@changeClick='changeClickd' :activeCity="activeCity" :hotCity="hotCity" :obtainCitys="obtainCitys"
					:isSearch="true" ref="citys"></city-select>

			</view>

		</uni-popup>
		<uni-popup ref="fff" type="bottom" border-radius="10px 10px 0 0">

		</uni-popup>
		<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0" :mask-click="false">
			<view style=" height: 800rpx; background-color: blanchedalmond; display: flex; ">
				<!-- <loading /> -->
			</view>
		</uni-popup>

		<uni-popup ref="surePage" type="bottom" border-radius="10px 10px 0 0" :mask-click="false">
			<view style="height: 85vh;overflow: scroll;border-radius: 20rpx 20rpx 0 0;">

				<sure :type="sureType" @surePageClick="surePageClick" :sure2Data="sure2Data" @closeSuer="closeSuer" />
			</view>
		</uni-popup>
		<uni-popup ref="surePageLj" type="center" :is-mask-click="false" border-radius="10px 10px 0 0">
			<view class="backAffirm-wrap" style="padding: 20rpx 0;height: 630rpx;width: 600rpx;">
				<view class="backAffirm-wrap-heard1">
					<image src="@/static/bj/icon_ljP.png" mode=""></image>

					<!-- <image src="@/static/index/icon_close.png" mode=""></image> -->
				</view>
				<view class="backAffirm-wrap-des1">
					-专属额度审批已出-
				</view>
				<view class="backAffirm-wrap-price">

					<text class="backAffirm-wrap-price-left">￥</text>
					<text class="backAffirm-wrap-price-right">20000</text>


				</view>

				<view class="backAffirm-wrap-ts1">
					<view>立即领取会专属借款额度</view>
					<view>今日内有效</view>


				</view>

				<view class="backAffirm-wrap-btn" style="width: 80%;" @click="goPage('/pagesC/list/index')">
					立即领取额度
				</view>
				<view class="backAffirm-wrap-close1" @click="closeBackAffirm">
					<image src="@/static/index/icon_gb.png" mode=""></image>
				</view>
			</view>

		</uni-popup>





	</view>



</template>

<script>
	import ccSelectDity from '@/uni_modules/uni-city/components/uni-city-picker/pages/index/index.vue'
	import {
		saveV5,
		address,
		surePush,
		clickChannel,
		authorizeAgain
	} from '@/api/index.js'
	import Notice from '@/components/jk-notice/index.vue'
	import baseApi from '../../config/index.config.js';
	import xyDialog from '@/components/xy-dialog/xy-dialog.vue';


	import citys from './citys.js'

	import sure from '@/pagesA/form/com/compornent/sure/index.vue'

	export default {
		components: {
			Notice,
			sure,
			ccSelectDity

		},
		data() {
			return {
				jobOptions: [{
						price: 40000,
						"title": "民营企业主",
						"field": "houseProperty",
						"value": '1',
						"select": false,
						"empty": false,
						"hot": false,
						isHeight: true
					},
					{
						price: 30000,
						"title": "事业单位",
						"field": "houseProperty",
						"value": '2',
						"select": false,
						"empty": false,
						"hot": false,
						isHeight: false
					},
					{
						price: 13000,
						"title": "上班族",
						"field": "houseProperty",
						"value": '3',
						"select": false,
						"empty": false,
						"hot": false,
						isHeight: false
					},
					{
						price: 7000,
						"title": "自由职业",
						"field": "houseProperty",
						"value": '4',
						"select": false,
						"empty": false,
						"hot": false,
						isHeight: false
					},
				],
				jobOptionss: [{
						title: '有房',
						"field": "houseProperty",
						value: 'houseProperty_1',
						key: '1',
					}, {
						title: '有车',
						"field": "carProduction",
						value: 'carProduction_1',
						key: '1',
					}, {
						title: '有社保',
						"field": "socialSecurity",
						value: 'socialSecurity_1',
						key: '1',
					},
					{
						title: '有保单',
						"field": "commercialInsurance",
						value: 'commercialInsurance_1',
						key: '1',
					},
					{
						title: '有信用卡',
						"field": "creditCard",
						value: 'creditCard_1',
						key: '1',
					},
					{
						title: '芝麻分',
						"desc": "700分以上",
						"field": "sesamePoints",
						"value": 'sesamePoints_5',
						key: '5',
					},
					{
						title: '芝麻分',
						"desc": "650-700分",
						"field": "sesamePoints",
						"value": 'sesamePoints_4',
						key: '4',
					},
					{
						title: '芝麻分',
						"desc": "600-649分",
						"field": "sesamePoints",
						"value": 'sesamePoints_3',
						key: '3',
					},
					{
						title: '芝麻分',
						"desc": "500-599分",
						"field": "sesamePoints",
						"value": 'sesamePoints_2',
						key: '2',
					},
					{
						title: '芝麻分',
						"desc": "500分以下",
						"field": "sesamePoints",
						"value": 'sesamePoints_1',
						key: '1',
					},
					{
						title: '公积金',
						"field": "accumulationFund",
						desc: '6个月以下',
						value: 'accumulationFund_2',
						key: '2',
					}, {
						title: '公积金',
						"field": "accumulationFund",
						desc: '6个月以上',
						value: 'accumulationFund_1',
						key: '1',
					}
				],
				ightxb: '',

				heightTop: '',
				isMsg: false,
				sure2Data: {},
				percent: 2,
				form: {
					age: '',
					gender: '1',
					"cityName": "",
					"cityCode": "",
					"provinceName": '',
					"provinceCode": '',
					// "gender": "",
					"company": '', // 职业
					// 以下是资产相关字段
					"houseProperty": "", //房
					"carProduction": "", //车
					"accumulationFund": '', //公积金
					"socialSecurity": '', //社保
					"sesamePoints": "", //芝麻分
					"commercialInsurance": '', //保单
					"creditCard": '', //信用卡
					// "creditStatus": '',
					name: '',
				},
				closeZcxxAcitveHeight: '100rpx',
				closeZcxxAcitveBjt: "https://oss.jht.jht.cash/img/20250506/jJDBBCS6.png",

				closeZcxxAcitve: true,
				noticeContent: '请写真实信息通过率更高！',

				channelId: "",
				productData: {},
				token: "",
				activeCity: {
					cityCode: '3301',
					cityName: '杭州市',
					provinceName: '浙江省',
					provinceCode: '33'
				},
				formatName: "cityName",
				hotCity: [{
					cityName: '杭州市',
					cityCode: '3301',
					provinceName: '浙江省',
					provinceCode: '33',
				}, {
					cityName: '北京市',
					cityCode: '1101',
					provinceName: '北京',
					provinceCode: '11',
				}, {
					cityName: '南京市',
					cityCode: '3201',
					provinceName: '江苏省',
					provinceCode: '32',
				}, {
					cityName: '合肥市',
					cityCode: '3401',
					provinceName: '安徽省',
					provinceCode: '34',
				}, {
					cityName: '石家庄市',
					cityCode: '1301',
					provinceName: '河北省',
					provinceCode: '13',
				}, {
					cityName: '上海市',
					cityCode: '3101',
					provinceName: '上海',
					provinceCode: '31',
				}, {
					cityName: '广州市',
					cityCode: '4401',
					provinceName: '广东省',
					provinceCode: '44',
				}, {
					cityName: '深圳市',
					cityCode: '4403',
					provinceName: '广东省',
					provinceCode: '44',
				}, ],
				obtainCitys: citys,
				phone: "",
				value: '杭州',
				title: "",
				sureType: 1,
				windowHeight: "",
				requestData: {
					"name": "",
					"age": "",
					"cityName": "",
					"gender": "",
					"creditStatus": 1,
					"company": '', // 职业
					"houseProperty": "", //房
					"carProduction": "", //车
					"accumulationFund": '', //公积金
					"socialSecurity": '', //社保
					"sesamePoints": "", //芝麻分
					"commercialInsurance": '', //保单
					"creditCard": '', //信用卡
				},
				list1: [{
					open: true,
					"index": 0,
					"title": "房产情况",
					flag: 0,
					percent: 22,
					selectData: {
						"title": "",
					},
					active: null,
					"content": [{
							price: 80000,
							"title": "有房",
							"field": "gender",
							"value": '1',
							"select": false,
							"empty": false,
							"hot": false,
							isHeight: true
						},
						{
							price: 7000,
							"title": "无房",
							"field": "gender",
							"value": '0',
							"select": false,
							"empty": false,
							"hot": false,
							isHeight: false
						},
					]
				}],
				list: [{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "房产情况",
						flag: 0,
						percent: 22,
						active: null,
						"content": [{
								price: 80000,
								"title": "有房",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 7000,
								"title": "无房",
								"field": "gender",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "车产情况",
						flag: 0,
						active: null,
						percent: 40,
						"content": [{
								price: 30000,
								"title": "有车",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 7000,
								"title": "无车",
								"field": "gender",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "公积金缴纳",
						flag: 0,
						percent: 60,
						active: null,
						"content": [{
								price: 20000,
								"title": "12个月以上",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "6-12月",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "6个月以下",
								"field": "gender",
								"value": '2',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "无公积金",
								"field": "gender",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},



						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "社保情况",
						flag: 0,
						percent: 70,
						active: null,
						"content": [{
								price: 20000,
								"title": "12个月以上",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "6-12月",
								"field": "gender",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "6个月以下",
								"field": "gender",
								"value": '2',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "无社保",
								"field": "gender",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
						]
					},

					{
						selectData: {
							"title": "",
						},
						active: null,
						open: false,
						"index": 1,
						flag: 1,
						"title": "芝麻分",
						percent: 90,
						"content": [{
								price: 20000,
								"title": "700分以上",
								"field": "sesamePoints",
								"value": '5',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "650-700分",
								"field": "sesamePoints",
								"value": '4',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 13000,
								"title": "600-649分",
								"field": "sesamePoints",
								"value": '4',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "600分以下",
								"field": "sesamePoints",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							// {
							// 	price: 7000,
							// 	"title": "无",
							// 	"field": "sesamePoints",
							// 	"value": '0',
							// 	"select": false,
							// 	"empty": false,
							// 	"hot": false,
							// 	isHeight: false
							// },


						]
					},

					{
						selectData: {
							"title": "",
						},
						active: null,
						open: false,
						flag: 1,
						"index": 2,
						percent: 100,
						"title": "职业",
						"content": [{
								price: 40000,
								"title": "民营企业主",
								"field": "houseProperty",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 30000,
								"title": "公务员/事业单位",
								"field": "houseProperty",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 13000,
								"title": "上班族",
								"field": "houseProperty",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "自由职业",
								"field": "houseProperty",
								"value": '4',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},

						]
					},
					// {
					// 	active: null,
					// 	open: false,
					// 	flag: 1,
					// 	"index": 3,
					// 	"title": "车产信息",
					// 	"content": [{
					// 			"title": "有",
					// 			"field": "carProduction",
					// 			"value": '1',
					// 			"select": false,
					// 			"empty": false,
					// 			"hot": false,
					// 		},
					// 		{
					// 			"title": "无",
					// 			"field": "carProduction",
					// 			"value": '0',
					// 			"select": false,
					// 			"empty": false,
					// 			"hot": false,
					// 		},
					// 	]
					// }
				],
				allPrice: 0,
				userInfo: {},
				showPupType: null,
				dingHeight: ''
			}
		},
		onShow() {
			let data = {
				name: '新用户留资页',
				age: "23"
			}
			this.$ymmd(data)
		},
		onLoad(option) {

			// this.$nextTick(()=>{
			// 	this.$refs.surePage.open()
			// })
			let that = this
			this.obtainvalue();
			// this.loaction();
			this.token = this.obtainuser();
			this.obtainphone();
			if (option.type) {
				this.type = option.type
				if (this.type == 1) {
					this.authorizeAgainInit()
				}
				// this.userInfo = JSON.parse(decodeURIComponent(option.userInfo));
			}
			this.list.map(resw => {

				if (resw.content.length == 2) {
					resw.heightTop = "top:-39%"
				} else {
					resw.heightTop = "top:-49%"
				}
			})
			// this.$refs.surePage.open()
			// this.obtainCitys = citys
			// 计算出可用高度
			uni.getSystemInfo({
				success: function(res) {
					// if(res.osName==)
					if (res.osName == 'android') {
						that.dingHeight = ''
					} else if (res.osName == 'ios') {
						that.dingHeight = '100'
					}

				}
			});
			this.init()
		},
		onBackPress(options) {
			let that = this
			// that.$nextTick(() => {

			// 	that.$refs.backAffirm.open()
			// })
			// return true;
		},

		methods: {
			ww(data) {
				this.form.cityName = data
			},
			radioChange(val) {
				this.form.gender = val.detail.value
				console.log(val.detail.value, 'xxxx')
			},
			blur(type) {
				let data = {
					title: '',
					selectData: {
						value: ''
					}
				}

				if (type == 1) {
					data.title = '姓名'
					data.selectData.value = this.form.name
				} else if (type == 2) {
					data.title = '年龄'
					data.selectData.value = this.form.age
				}
				this.senTj(data)
			},

			async authorizeAgainInit() {
				let rrr = await authorizeAgain()
				if (rrr) {
					this.$jumpComPage(rrr)
				}
				// console.log(rrr.data.page,'datadatadata')
			},
			// 寻找市省
			getCityFromAddress(address1) {
				let address = address1;
				let province = address.substring(0, address.indexOf("省") + 1); // 广东省
				let city = address.substring(address.indexOf("省") + 1, address.indexOf("市") + 1); // 广州市
				let district = address.substring(address.indexOf("市") + 1); // 天河区

				return city;



				return;
			},

			async init() {
				let addressData = await address()
				this.form.cityName = addressData.data
			},
			// 选择男女
			ightxbBtn(index) {
				this.ightxb = index
				this.form.gender = index

				let data = {
					title: '性别',
					selectData: {
						value: this.form.gender
					}
				}
				this.senTj(data)
			},
			// 关闭资产信息
			closeZcxx() {
				this.closeZcxxAcitve = !this.closeZcxxAcitve
				if (this.closeZcxxAcitve == true) {
					this.closeZcxxAcitveBjt = "https://oss.jht.jht.cash/img/20250506/jJDBBCS6.png"
					this.closeZcxxAcitveHeight = '100rpx'
				} else {
					this.closeZcxxAcitveBjt = "https://oss.jht.jht.cash/img/20250429/zIiV9OBw.png"

					this.closeZcxxAcitveHeight = ''
				}

			},
			senTj(item) {
				console.log(item, '我爱你啊')
				let sendEventMsg = ""
				if (item.title == "房产情况") {
					sendEventMsg = "form_houseProperty"
				} else if (item.title == "车产情况") {
					sendEventMsg = "form_carProduction"
				} else if (item.title == "公积金缴纳") {
					sendEventMsg = "form_accumulationFund"
				} else if (item.title == "社保请况") {
					sendEventMsg = "form_socialSecurity"
				} else if (item.title == "芝麻分") {
					sendEventMsg = "form_sesamePoints"
				} else if (item.title == "职业") {
					sendEventMsg = "form_company"
				} else if (item.title == '姓名') {
					sendEventMsg = "form_name"
				} else if (item.title == '年龄') {
					sendEventMsg = "form_age"
				} else if (item.title == '性别') {
					sendEventMsg = "form_gender"
				}

				this.$ymmdBtn(sendEventMsg, {
					name: item.title,
					value: item.selectData.value
				})
			},
			checkMsg(item, index, items, indexs) {
				this.senTj(item)


				//item  外面的对象 items   里面选择的

				// 赋值改变的
				this.$set(item, 'active', indexs)


				this.list.map(res => {
					// item.title=res.title
					// console.log(items,'items')
					if (res.title == item.title && this.list.length != this.list1.length) {

						this.percent += 10
						item.open = false
						this.list1.push(this.list[index + 1])
						this.list1[index + 1].open = true
					}

				})
				item.selectData = items

				this.percent = item.percent



				this.calculate()
			},

			scrollToPosition() {

				uni.pageScrollTo({
					selector: "#jcxx",
					scrollTop: 300,
					duration: 300,
					success(e) {
						console.log(e, 'sss')
					}
				});
			},
			calculate() {
				// this.allPrice = this.list1.reduce((sum, item) => sum + item.price, 0);
				// console.log(this.allPrice,'this.allPrice')
				// return;
				this.allPrice = 0
				this.list1.map(res => {

					if (res.selectData && res.selectData.price) {

						this.allPrice += res.selectData.price
					}

				})

			},
			closeBackAffirm() {

				this.$refs.surePageLj.close()

			},
			closeSuer() {
				this.$refs.surePage.close()
				this.$refs.surePageLj.open()

			},
			async surePageClick(value) {
				this.$ymmdBtn("ymBtnPush", {
					name: '点击推送'
				})
				console.log("胶胶价")
				// 确定按钮
				// 0 机构
				// 1平台
				let data = {
					id: this.sure2Data.id,
					sure: 0
				}
				let res = await surePush(data)
				if (res) {

					uni.navigateTo({
						url: `/pagesC/list/index`
					})
				}
				if (res.code == 100000) {
					let ooData = {
						type: 9
					}
					let oo = await clickChannel(ooData)

				}
			},
			obtainphone() {
				var paraString = window.location.href
				var c = paraString.split('&p=')
				if (c.length > 1) {
					this.phone = decodeURI(c[1])

				}
			},
			obtainvalue() {
				var paraString = window.location.href
				var c = paraString.split('?')

				if (c.length > 1) {
					var b = c[1]

					var d = b.split('#')

					if (d.length > 1) {

						var e = d[0].split('=')

						if (e.length > 1) {

							var e = e[1].replace(' ', '')
							var f = e.split('&')
							if (f.length > 1) {
								this.channelId = f[0].replace(' ', '')
							} else {
								this.channelId = e
							}

						} else {
							this.channelId = ''
						}
					} else {
						this.channelId = ''
					}

				} else {
					this.channelId = ''
				}
			},
			obtainuser() {
				var paraString = window.location.href
				var c = paraString.split('&')
				for (let i = 0; i < c.length; i++) {
					if (c[i].indexOf("token") != -1) {
						var d = c[i].split("=")
						if (d.length > 1) {
							return d[1]
						}
					}
				}
				return 0

			},
			cityClick(item) {
				this.form.cityName = item.cityName;
				this.form.cityCode = item.cityCode;
				this.$refs.popcity.close()
			},
			handleCloseCityChoose() {
				this.$refs.popcity.close()
			},
			chooseCity() {
				this.$ymmdBtn("ymBtnLocation", {
					name: '点击当前居住城市'

				})
				this.$refs.popcity.open('bottom')
			},
			loaction() {
				uni.getLocation({
					type: 'wgs84',
					success: function(res) {
						let url =
							"https://restapi.amap.com/v3/geocode/regeo?key=ebab6dbb6d7f4f2bccb3c0bb4adabc2b&location=" +
							res.longitude + "," + res.latitude + "&radius=1000&extensions=all&roadlevel=0";
						uni.request({
							url: url,
							method: 'POST',
							success(res) {},
							fail(error) {

							}
						})
					}
				});
			},
			ageinputClick(value) {
				this.requestData['age'] = value.detail.value
			},
			nameinputClick(value) {
				this.requestData['name'] = value.detail.value
			},
			cellClick(value, index, k) {
				let contests = this.list[index]['content'];
				for (let i = 0; i < contests.length; i++) {
					if (i == k) {
						contests[i]['select'] = true;
						this.requestData[contests[i]['field']] = contests[i]['value'];
					} else {
						contests[i]['select'] = false;
					}

				}
			},
			isValidIDCard(id) {
				const regex18 = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))((0[1-9])|([1-2][0-9])|30|31)\d{3}[\dX]$/i;
				const regex15 = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/;
				return regex18.test(id) || regex15.test(id);
			},
			async loginclick() {
				if (this.form.name == '') {
					this.ts("请填写姓名")
					return;
				} else if (this.form.age == '') {
					this.ts("请填写年龄")
					return;
				} else if (this.form.gender == '') {
					this.ts("请选择性别")
					return;
				} else if (!this.form.company) {
					this.ts("请选择职业")
					return;
				}
				this.$ymmdBtn("ymBtnLjsq", {
					name: '点击立即申请'
				})
				this.$refs.fff.open()
				uni.showLoading({
					mask: true,
					title: "正在努力匹配中,请稍后...",


				})

				let res = await saveV5(this.form)
				console.log(res, 'res')
				if (res.code == 100000) {
					let ooData = {
						type: 11
					}
					let oo = await clickChannel(ooData)
					if (res.data) {
						if (res.data.page == 'list') {
							this.$refs.fff.close()
							uni.hideLoading();
							this.goPage('/pagesC/list/index')
						} else if (res.data.page == 'sure1') {
							this.showPupType = 1
							this.sure2Data = res.data
							this.$refs.fff.close()
							uni.hideLoading();
							this.$refs.surePage.open()
						} else if (res.data.page == 'sure2') {
							this.showPupType = 2
							this.sure2Data = res.data
							this.$refs.fff.close()
							uni.hideLoading();
							this.$refs.surePage.open()

						} else if (res.data.page == 'half') {

							this.sure2Data = res.data


							this.$refs.fff.close()
							uni.hideLoading();
							this.$refs.surePage.open()
						} else if (res.data.page == "end") {
							this.$refs.fff.close()
							uni.hideLoading();
							this.goPage('/pagesE/result/index')

						}
					}
				} else {
					console.log("错么嘛")
					this.$refs.fff.close()
					uni.hideLoading();

				}
				return;
				let a = null;
				this.$refs.fff.open()
				uni.showLoading({
					mask: true,
					title: "正在匹配中,请稍后...",

				})
				setTimeout(() => {
					a = 2
					console.log("走了吗啊")
					if (a == 1) {} else if (a == 2) {

					} else if (a == 3) {
						this.goPage('/pagesC/list/index')
					}
				}, 2000);

				return;
				let data = this.requestData;
				var msg = "";
				for (const key in data) {
					switch (key) {
						case "name":
							if (data[key].length == 0) {
								msg = "请输入姓名";
							}
							break;
						case "age":
							if (data[key].length == 0) {
								msg = "请输入年龄";
							}
							break;
						case "cityName":
							if (data[key].length == 0) {
								msg = "请选择城市";
							}
							break;
						case "gender":
							if (data[key].length == 0) {
								msg = "请选择性别";
							}
							break;
						case "carProduction":
							if (data[key].length == 0) {
								msg = "请选择车产信息";
							}
							break;
						case "houseProperty":
							if (data[key].length == 0) {
								msg = "请选择房产信息";
							}
							break;
						case "sesamePoints":
							if (data[key].length == 0) {
								msg = "请选择芝麻分";
							}
							break;
						default:
							break;
					}
				}

				if (msg.length == 0) {
					// loading
					this.$refs.popup.open('bottom')
					let phoneStr = this.phone
					let that = this
					uni.request({
						// timeout: 3000,
						header: {
							"token": this.token,
							'channeid': that.channelId,
							'platform': "H5-" + uni.getSystemInfoSync().platform
						},
						url: baseApi.baseUrl + '/userInfo/saveV5',
						data: this.requestData,
						dataType: 'json',
						method: 'POST',
						success(res) {
							that.$refs.popup.close()
							if (res.data.code != 100000) {
								console.log(res.data.code)
								uni.navigateTo({
									url: "/pagesC/list/index?channelId=" + that.channelId +
										"&token=" + that.token + "&p=" + phoneStr
								})
								return
							}
							uni.request({
								header: {
									'channeid': that.channelId,
									'platform': "H5-" + uni.getSystemInfoSync().platform
								},
								url: baseApi.baseUrl + '/clickChannel',
								method: 'POST',
								data: {
									"mobile": phoneStr,
									"type": 11
								},
								dataType: 'json',
							})

							if (res.data.data.page == "sure1") {
								that.sureType = 1
								that.$refs.surePage.open('bottom')
								that.productData = res.data.data
							} else if (res.data.data.page == "sure2") {
								that.sureType = 2
								that.$refs.surePage.open('bottom')
								that.productData = res.data.data
							} else if (res.data.page == 'half') {

								this.sure2Data = res.data

								this.$refs.fff.close()
								uni.hideLoading();
								this.$refs.surePage.open()
							} else if (res.data.data.page == "list") {
								uni.navigateTo({
									url: "/pagesC/list/index?channelId=" + that.channelId +
										"&token=" + that.token + "&p=" + phoneStr
								})
							} else if (res.data.data.page == "end") {
								url = `/pagesE/result/index`;
							}
							console.log()

						},
						fail(fail) {
							that.$refs.popup.close()
							uni.showToast({
								title: "提交失败"
							})
						}
					})
				} else {
					uni.showToast({
						title: msg
					})
				}

			},
			ts(tit) {
				uni.showToast({
					title: tit,
					icon: "none"
				})
			},
			goPage(url) {
				uni.navigateTo({
					url
				})
			},
			handleZichan(curItem) {
				console.log(curItem, 'curItem')
				// 如果是芝麻分、公积金一类已选择某个选项，需要互斥
				if (!!this.form[curItem.field] && this.form[curItem.field] !== '0') {
					if (this.form[curItem.field] === curItem.key) {
						this.form[curItem.field] = '0';
					} else {
						this.form[curItem.field] = curItem.key;
					}
				}
				// 资产再次点击支持取消
				else {
					// this.form.zichan.push(curItem.value)
					this.form[curItem.field] = curItem.key;
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.red-line {
		width: 8rpx;
		height: 28rpx;
		background-color: #FF0000;
		/* 红色 */
		margin-right: 16rpx;
		border-radius: 4rpx;
		/* 可选，圆角更美观 */
		margin-top: 8rpx;
	}

	.xb {
		font-size: 40rpx;
	}

	.form-list-head-msg-left {
		width: 202rpx;
		height: 44rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.form-list-head-msg-right-desc {
		color: #FB6C28;
		font-size: 22rpx;
		font-weight: 500;
	}

	.job-options {
		display: grid;
		grid-template-columns: 1fr 1fr;
		/* 创建两列，每列宽度相等 */
		gap: 28rpx;
		/* 可选，设置列与列之间的间隙 */
	}

	.job-option {
		text-align: center;
		background-color: #F0F4FF;
		color: #333;
		border-radius: 12rpx;
		font-size: 28rpx;
		padding: 24rpx;
		letter-spacing: 4rpx;
	}

	.job-optionszc {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		gap: 46rpx;
		padding-top: 24rpx;
	}

	.job-optionzc {
		height: 88rpx;
		text-align: center;
		background-color: #F0F4FF;
		color: #333;
		border-radius: 12rpx;
		font-size: 28rpx;
		display: flex;
		justify-content: center;
		align-items: center;

		.job-optionzc-container {
			.job-optionzc-desc {
				font-size: 20rpx;
				margin-top: 6rpx;
			}
		}
	}

	.job-optionzc.active {
		background-color: #3b82f6;
		color: #fff;
	}



	.job-option.active {
		background-color: #3b82f6;
		color: #fff;
	}

	.bj1 {
		background-image: url(../../static/login/首页切图.png);
		width: 100vw;
		height: 100vh;
		background-size: 100% 100%;
		padding: 48rpx 0;
	}

	.ai {
		align-items: center;
	}

	page {
		background: #F3F4F5;
	}

	.des {
		color: #999999;
		font-size: 24rpx;
		margin: 16rpx 0;
		text-align: center;
	}

	.msg-wrap {
		margin-bottom: 50rpx;
		height: 760rpx;
	}

	.backAffirm-wrap {
		.backAffirm-wrap-list {
			.backAffirm-wrap-list-msg {
				.backAffirm-wrap-list-msg-img {
					width: 32rpx;
					height: 32rpx;

					vertical-align: center;
				}

				.backAffirm-wrap-list-msg-msg {
					font-size: 30rpx;
					margin-left: 20rpx;
				}

				display: flex;
				align-items: center;
				margin: 30rpx;
			}

			width: 80%;
			padding:4rpx 36rpx;
			margin: 0 auto;
			background: #EBF3FF;
			border-radius: 20rpx;
		}

		.backAffirm-wrap-btn {
			background: linear-gradient(90deg, #6CB0F2 0%, #3C75F2 100%);
			box-shadow: 0px 8rpx 15px 2px #B2CBEA;
			border-radius: 100rpx;
			width: 60%;
			margin: 20rpx auto auto auto;
			line-height: 80rpx;
			text-align: center;
			color: #ffffff;
			font-size: 30rpx;

		}

		.backAffirm-wrap-ts1 {
			font-size: 28rpx;
			color: #999999;
			text-align: center;
		}

		.backAffirm-wrap-ts {
			color: #999999;
			font-size: 26rpx;
			width: 80%;
			margin: 30rpx auto;
		}

		.backAffirm-wrap-price {
			display: flex;
			align-items: center;
			justify-content: center;

			.backAffirm-wrap-price-left {
				font-weight: 500;
				font-size: 48rpx;
				color: $mian-color;
			}

			.backAffirm-wrap-price-right {
				font-weight: bold;
				font-size: 100rpx;
				color: $mian-color;
			}
		}

		.backAffirm-wrap-des1 {
			color: #333;
			font-size: 30rpx;
			text-align: center;
			padding: 20rpx;
		}

		.backAffirm-wrap-des {
			color: $mian-color;
			font-size: 32rpx;
			text-align: center;
			padding: 40rpx;
		}

		.backAffirm-wrap-heard1 {
			width: 200rpx;
			height: 200rpx;
			margin: 0 auto;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.backAffirm-wrap-heard {
			width: 100%;
			height: 150rpx;
			background-image: url('../../static/index/icon_close.png');
			background-size: 100% 100%;
			text-align: right;

			image {
				width: 200rpx;
				height: 200rpx;
				margin: -60rpx -16rpx 0 0;


			}
		}

		height: 800rpx;
		width: 690rpx;
		border-radius: 20rpx;
		background-color: #ffffff;
	}

	.msg-wrap-msg {
		padding: 20rpx 0;
		display: flex;
		margin-bottom: 24rpx;

		.uni-radio-gender-list {
			margin-left: 20rpx;
			flex: 1;

			.uni-radio-wrapper .uni-radio-input {
				width: 42rpx !important;
				height: 42rpx !important;
			}
		}

		.msg-wrap-left {
			font-weight: 500;
			width: 80rpx;
			font-size: 28rpx;
			color: #333;
			align-items: center;
			margin-top: 20rpx;
			font-family: PingFang SC-Medium
		}

		.msg-wrap-right-name {
			border-bottom: 2rpx solid rgba(#000000, 0.08);
			display: flex;
			flex-direction: row;
			align-items: center;
			padding-left: 20rpx;
		}

		.msg-wrap-right-age {
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			padding-bottom: 15rpx;
			border-bottom: 2rpx solid rgba(#000000, 0.08);
		}

		.msg-wrap-rightxb {
			justify-content: flex-end;

			view {
				width: 154rpx;
				height: 62rpx;
				background: #F1F8FF;
				border-radius: 12rpx;
				text-align: center;
				line-height: 62rpx;
				color: #C3C3C3;
				margin-left: 20rpx;
			}
		}

		.msg-wrap-right {
			text-align: left;
			flex: 1;
			margin-top: 20rpx;

			input {
				font-size: 28rpx;
				text-align: right;
			}

			.msg-wrap-right-text {
				.msg-wrap-right-text-jt {
					margin-left: 20rpx;
				}

				font-size: 44rpx;
				color: #3C75F2;
				font-weight: 500;
			}
		}
	}

	// /deep/.uni-collapse-item__wrap {
	// 	height: 100%!important;
	// }

	.acctive {
		border: 4rpx solid $mian-color !important;
		color: $mian-color !important;
	}

	.sfqtag-wrap1 {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 45%;
		position: relative;
	}

	.sfqtag-wrap {
		flex-wrap: wrap;
		// min-height: 160rpx;
		justify-content: space-around;
		// position: relative;
		// margin: 20px 0;

		// justify-content: space-around;
		.sfqtag {
			background: #F1F8FF;
			border-radius: 4rpx;
			// width: 100%;
			width: 280rpx;
			text-align: center;
			line-height: 80rpx;
			color: #333333;
			height: 80rpx;
			border-radius: 12rpx;
			margin-bottom: 20rpx;
		}

		.sfqtagImg {
			position: absolute;
			top: -37%;
			// z-index: 10;
			right: 9%;

			width: 98rpx;
			height: 50rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.form-list-headBj {
		height: 100rpx;
		background-image: url("https://oss.jht.jht.cash/img/20250506/jJDBBCS6.png");
	}

	.form-list-head {
		.form-list-head-msg-close {
			width: 20%;
			line-height: 75rpx;
			text-align: right;
		}

		.form-list-head-msg {
			padding: 12rpx 16rpx;

		}

		justify-content: space-between;
		// align-items: center;
		padding: 0 20rpx 0 0;

		background-size: 100% 100%;
		// border-radius:40rpx 40rpx 40rpx 0;
		margin-top: -74rpx;
	}

	/deep/.uni-progress-inner-bar {
		border-radius: 200px;
	}

	/deep/.uni-progress-bar {
		height: 10px !important;
		border-radius: 100px !important;
	}

	.form-des {
		.form-des-msg {
			margin-top: 58rpx;
			line-height: 60rpx;
		}

		.form-head3 {
			margin-bottom: 30rpx;
		}

		.form-head1 {
			font-size: 50rpx;
			// margin-top: 30rpx;
			// margin-bottom: 10rpx;
			font-weight: 500;
		}

		.form-head2 {
			font-family: din;
			font-size: 64rpx;
			// margin-top: 30rpx;
			// margin-bottom: 10rpx;
			font-weight: 500;
		}

		.form-head1 {
			font-size: 28rpx;
		}

		// width: 100%;
		color: #ffffff;
		background-image: url(../../static/bj/icon_xxhead.png);
		// background-color: $mian-color;
		background-size: 100% 100%;
		border-radius: 20rpx;
		height: 280rpx;
		margin: 20rpx 0 0 0;
		padding: 0 38rpx;
		display: flex;
		flex-direction: column;
		// justify-content: space-evenly;
	}

	.backAffirm-wrap-close {
		width: 60rpx;
		height: 60rpx;
		margin: 50rpx auto auto auto;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.backAffirm-wrap-close1 {
		width: 60rpx;
		height: 60rpx;
		margin: 100rpx auto auto auto;

		image {
			width: 100%;
			height: 100%;
		}
	}




	.cell_select {
		padding: 10rpx;
		background-color: #FFEAE0;
		border-radius: 25rpx;
		box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(43, 83, 230, 0.21);
	}

	.cell_noselect {
		padding: 10rpx;
		background-color: #ffffff;
		border-radius: 25rpx;
		box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(43, 83, 230, 0.21);
	}

	.cell_noshow {
		padding: 10rpx;
		border-radius: 25rpx;
		background-color: #ffffff;
		background-color: #FFEAE0;
	}

	.gobutton {
		background: linear-gradient(90deg, #6CB0F2 0%, #3C75F2 100%);
		box-shadow: 0px 4px 15px 2px #B2CBEA;
		border-radius: 48px 48px 48px 48px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin-left: 40rpx;
		margin-right: 40rpx;
		// margin-bottom: 30rpx;
		margin-top: -160rpx;
		height: 90rpx;
		color: #ffffff;
		font-size: 40rpx;
		text-align: center;
		border-radius: 45rpx;
	}

	.ightxbActive {
		background: #6BAEF2 !important;
		color: #fff !important;
	}
</style>